package com.census.entity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;

/**
 * Created by WangKai's Hands.
 * User:WangKai
 * Date:2017/7/9
 * Time:14:11
 * Email: 1786025737@qq.com
 */
@Entity
public class Manager {
    private int managerId;
    private String managerName;
    private String managerCardId;
    private String managerPwd;

    @Id
    @Column(name = "manager_id")
    public int getManagerId() {
        return managerId;
    }

    public void setManagerId(int managerId) {
        this.managerId = managerId;
    }

    @Basic
    @Column(name = "manager_name")
    public String getManagerName() {
        return managerName;
    }

    public void setManagerName(String managerName) {
        this.managerName = managerName;
    }

    @Basic
    @Column(name = "manager_card_id")
    public String getManagerCardId() {
        return managerCardId;
    }

    public void setManagerCardId(String managerCardId) {
        this.managerCardId = managerCardId;
    }

    @Basic
    @Column(name = "manager_pwd")
    public String getManagerPwd() {
        return managerPwd;
    }

    public void setManagerPwd(String managerPwd) {
        this.managerPwd = managerPwd;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Manager manager = (Manager) o;

        if (managerId != manager.managerId) return false;
        if (managerName != null ? !managerName.equals(manager.managerName) : manager.managerName != null) return false;
        if (managerCardId != null ? !managerCardId.equals(manager.managerCardId) : manager.managerCardId != null)
            return false;
        if (managerPwd != null ? !managerPwd.equals(manager.managerPwd) : manager.managerPwd != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = managerId;
        result = 31 * result + (managerName != null ? managerName.hashCode() : 0);
        result = 31 * result + (managerCardId != null ? managerCardId.hashCode() : 0);
        result = 31 * result + (managerPwd != null ? managerPwd.hashCode() : 0);
        return result;
    }
}
